﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>新闻信息管理</title>
<link href="${ctx}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/js/validate/jquery.validate.js" type="text/javascript"></script>
<script src="${ctx}/js/validate/messages_cn.js" type="text/javascript"></script>
	
<script>
$(document).ready(function(){

		$("#names").focus();
		$("#columnForm").validate({
			 rules: { 
				names: { 
        			required: true, 
        			maxlength:20,
        			remote: "epColumnAction!checkName.action?orgName=''&columnName="+$("#columnName").attr("value")+"&math="+Math.random()
    			},
            	shortName: {
                    required: true ,
			        maxlength:20
        	    },
        	    orderColumn:{
        	    	required: true ,
        	    	number:true
        	    },
        	    linkUrl:{
        	    	url:true,
        	    	maxlength:100
        	    },
        	    typeColumn:{
        	    	required: true ,
        	    	maxlength:50
        	    },
        	    frontNum:{
        	    	maxlength:20
        	    },
        	    num:
        	    {
        	    	maxlength:20
        	    },
        	    intro:
        	    {
        	    	maxlength:500
        	    }
			}	
		});
	});	
</script>
	</head>
	<body>
	<div class="rhead">
		<div class="rpos">当前位置: 栏目配置 - 添加栏目信息</div>
		<div class="ropt"><input type="button" value="返回" onclick="history.back()"/></div>
		<div class="clear"></div>
	</div>
	<form action="epColumnAction!add.action" method="post" id="columnForm">
		<table  align="center" class="listTable3" width="90%">
			<tr>
				<td class="pn-flabel">父级栏目</td>
				<td>
					<select id="columnName" name="enterpriseColumn.father">
						<option value="0">总站</option>
						<!-- 一级导航 -->
						<c:forEach var="epColumnOut" items="${epColumnOutList}">
							<c:if test="${epColumnOut.enterpriseColumn.typeColumn=='list' or epColumnOut.enterpriseColumn.typeColumn=='download'}">
								<option value="${epColumnOut.enterpriseColumn.id}">${epColumnOut.enterpriseColumn.names}</option>
							</c:if>
							<c:forEach var="enterpriseColumn" items="${epColumnOut.enterpriseColumnList}">
								<c:if test="${enterpriseColumn.typeColumn=='list' or epColumnOut.enterpriseColumn.typeColumn=='download'}">
									<option value="${enterpriseColumn.id}">&nbsp;&nbsp;&nbsp;&nbsp;${enterpriseColumn.names}</option>
								</c:if>
							</c:forEach>
						</c:forEach>
					</select>
					栏目的上一级,只有list和download类型才能有子栏目
				</td>
			</tr>
			<tr>
				<td class="pn-flabel">栏目名称</td><td><input type="text" id="names" name="names" size="60" />请不要重复</td>
			</tr>
			<tr>
				<td class="pn-flabel">栏目简称</td><td><input type="text" name="shortName" size="60" />可自定义</td>
			</tr>
			<tr>
				<td class="pn-flabel">栏目模块名称</td><td><input type="text" name="frontNum" size="60" />模块名称的设置将影响到页面的显示效果,请参考开发文档</td>
			</tr>
			<tr>
				<td class="pn-flabel">栏目排序</td><td><input type="text" name="orderColumn" size="60" />数字越小,排序越前,同级同栏目下请不要重复,以免影响效果</td>
			</tr>
			<tr>
				<td class="pn-flabel">模板类型</td>
				<td>
					<select name="typeColumn">
						<option value="mostlist">模块列表模型(mostlist)</option>
						<option value="list">列表模型(list)</option>
						<option value="link">单链接模型(link)</option>
						<option value="content">单页模型(content)</option>
						<option value="download">下载模型(download)</option>
					</select>请认真选择,添加之后模板类型将不能修改
				</td>
			</tr>
			<tr>
				<td class="pn-flabel">是否在主导航显示</td>
				<td>
					<select name="enterpriseColumn.isValidInNav">
						<option value="0">否</option>
						<option value="1">是</option>
					</select>
					(只有一级导航才能进行设置生效)
				</td>
			</tr>
			
			<tr>
				<td class="pn-flabel">链接地址</td><td><input type="text" name="linkUrl" size="60" />只有栏目设置为link时,此字段才有效果</td>
			</tr>
			
			<tr>
				<td class="pn-flabel">栏目编号</td><td><input type="text" name="num" size="60" />可自定义</td>
			</tr>
			<tr>
				<td class="pn-flabel">栏目介绍</td>
				<td>
					<textarea rows="10" cols="47" name="intro"></textarea>可自定义
				</td>
			</tr>
			<tr>
				<td class="pn-flabel">状态</td>
				<td>
					<select name="enterpriseColumn.state">
						<option value="1">已启用</option>
						<option value="0">已停用</option>
					</select>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="submit" value=" 提 交 "/>
					<input type="button" value=" 返回 " onclick="history.back()"/>
				</td>
			</tr>
		</table>
	</form>
	</body>
</html>

